#pragma once
#include "MessageQueue.h"
#include "Test.h"
class MessageQueueTest : public Test
{
private:
	const static int MSG_START		= 1;
	const static int MSG_SUSPEND	= 2;
	const static int MSG_CANCEL		= 3;
	const static int MSG_EXIT		= 4;
	const static int MSG_ERR		= 5;

	Looper looper;
	std::function<void(const Message&)> func = std::bind(&MessageQueueTest::ProcessMessage, this, std::placeholders::_1);
	std::function<void(const Message&)> callback = std::bind(&MessageQueueTest::HandleMessage, this, std::placeholders::_1);
	
	void ProcessMessage(const Message& message);
	void HandleMessage(const Message& message);

	void SendingMessage(int i, int delay);
	void TestLoop();
	void TestDelay();
	void ClearMessage();
public:
	void Start();
	void Stop();

};

